/**
 * 获取主页轮播图 无需授权
 *
 */
// export const getIndexData = (data, id) => uni.http({
//   url: `sq/banner/pageList${id ? `?id=${id}` : ''}`,
//   method: 'get',
//   requestType: 'bl',
//   data,
// })
// 获取首页Tab
export const getTabDataApi = (data) =>
  uni.http({
    url: 'blapp/v1/sort_list',
    method: 'get',
    data,
    from: '获取首页Tab',
  })

//获取 首页 搜索 tabs
export const getSearchTabApi = (data) =>
  uni.http({
    url: 'api/content/searchEnum',
    method: 'get',
    requestType: 'bl',
    data,
    from: '获取首页搜索Tab',
  })

// 上报负反馈

export const negativeFeedbackApi = (data) =>
  uni.http({
    url: 'api/airec/negative_feedback',
    method: 'get',
    data,
    requestType: 'bl',
    from: '上报负反馈',
  })

// 获取首页秒杀列表
export const getSeckillDataApi = (data) =>
  uni.http({
    url: 'blapp/v1/store_product_seckill',
    method: 'get',
    // requestType: 'bl',
    data,
    from: '获取首页秒杀列表',
  })
// 获取服务秒杀列表
export const getMbServiceSeckill = (data) =>
  uni.http({
    url: 'blapp/v1/get_mb_service_seckill',
    method: 'get',
    // requestType: 'bl',
    data,
    from: '获取首页秒杀列表',
  })

// 获取首页附近好店
export const getStoreListApi = (data) =>
  uni.http({
    url: 'blapp/v1/get_merchant',
    method: 'get',
    // requestType: 'bl',
    data,
    from: '获取首页附近好店',
  })
// 获取母婴附近好店
export const getMyfwMerchant = (data) =>
  uni.http({
    url: 'blapp/v1/get_myfw_merchant',
    method: 'get',
    // requestType: 'bl',
    data,
    from: '获取首页附近好店',
  })
// 上报曝光行为
export const saveViewApi = (data) =>
  uni.http({
    url: 'api/airec/expose',
    method: 'get',
    requestType: 'bl',
    data,
    from: '上报曝光行为',
  })
//是否是新人
export const newpeopleCheckUser = (data) =>
  uni.http({
    url: 'blapp/v1/newpeople/checkUser',
    method: 'get',
    requestType: 'app',
    data,
  })
export const getisRe = (data) =>
  uni.http({
    url: 'api/common/give_qianduan',
    method: 'get',
    requestType: 'bl',
    data,
  })

//更新用户活跃数据
export const newpeopleUserActiveCache = (data) =>
  uni.http({
    url: 'blapp/v1/newpeople/userActiveCache',
    method: 'get',
    requestType: 'app',
    data,
  })

export const getIndexData = (data) =>
  uni.http({
    url: 'blapp/v1/banner/list',
    method: 'get',
    requestType: 'app',
    data,
    from: '获取主页轮播图',
  })
// 获取金刚区
export const getIndexToolData = () =>
  uni.http({
    url: 'blapp/v1/banner/link_list',
    method: 'get',
    requestType: 'app',
    from: '获取主页金刚区',
  })
// 获取首页推荐
export const gettuijianData = (data) =>
  uni.http({
    url: `product/spu/hot/new`,
    method: 'get',
    requestType: 'shop',
    data,
  })
// 聚合搜索https://weapp.miyingbl.com/
export const getSearchData = (data = {}) =>
  uni.http({
    url: `api/content/newSearchList`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 聚合搜索推荐
export const getTuiJIanData = (data) =>
  uni.http({
    url: `api/content/recommendRevisionAll`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 热搜榜
export const gethotlist = (data) =>
  uni.http({
    url: `api/content/recommendRevisionAll`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 女性
export const getwomanlist = (data) =>
  uni.http({
    url: `api/content/recommendRevisionWoman`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 男性
export const getmanlist = (data) =>
  uni.http({
    url: `api/content/recommendRevisionMan`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 慢病
export const getmanbinglist = (data) =>
  uni.http({
    url: `api/content/recommendRevision`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 育儿
export const getbabylist = (data) =>
  uni.http({
    url: `api/content/recommendRevisionParenting`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 搜索自动补全
export const getAllData = (data) =>
  uni.http({
    url: 'blapp/v1/search/complete',
    method: 'GET',
    data,
  })
// 热门搜索词
export const getSearchHothistry = (data) =>
  uni.http({
    url: `api/content/searchDiscovery`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 获取历史搜索
export const getOldWord = (data) =>
  uni.http({
    url: `api/content/searchRecord`,
    method: 'get',
    requestType: 'bl',
    data,
  })

// 换一换
export const getRandomWord = (data) =>
  uni.http({
    url: `api/content/searchDiscoveryExchange`,
    method: 'get',
    requestType: 'bl',
    data,
  })

/**
 * 动态详情跳转
 *
 */
export const getDetail = (data, id) =>
  uni.http({
    url: `sq/post/getInfo?id=${id}`,
    method: 'get',
    requestType: 'bl',
    data,
  })
// 拉黑
export const blockUserApi = (data, id) =>
  uni.http({
    url: `api/member/block_user`,
    method: 'get',
    requestType: 'bl',
    data,
  })
//医生信息
export const doctorInfo = (data) =>
  uni.http({
    url: '/doctorapp/v1/info',
    method: 'get',
    data,
    requestType: '',
  })
//接诊开关
export const switchReceive = (data) =>
  uni.http({
    url: '/doctorapp/v1/switch_receive_patient',
    method: 'get',
    data,
    requestType: '',
  })
//其他医生信息
export const otherdoctorInfo = (data) =>
  uni.http({
    url: 'doctorapp/v1/other_doctor_homepage',
    method: 'get',
    data,
    requestType: '',
  })
//其他官方信息
export const otherofficialInfo = (data) =>
  uni.http({
    url: 'doctorapp/v1/official_user_homepage',
    method: 'get',
    data,
    requestType: '',
  })
